package com.glodon.paas.document.dao.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.glodon.paas.document.api.bean.Invitation;

public class InvitationEntity {

    public static Invitation getDto(InvitationEntity e) {
        if (e == null) {
            return null;
        } else {
            Invitation d = new Invitation();
            d.setId(e.getId());
            d.setAccount(e.getAccount());
            d.setMemberId(e.getMemberId());
            d.setToken(e.getToken());
            d.setCreateTime(e.getCreateTime());
            d.setUpdateTime(e.getUpdateTime());
            d.setStatus(e.getStatus());
            return d;
        }
    }

    public static List<Invitation> getDtos(List<InvitationEntity> es) {
        if (es == null) {
            return null;
        } else {
            List<Invitation> ds = new ArrayList<Invitation>(es.size());
            for (InvitationEntity e : es) {
                ds.add(getDto(e));
            }
            return ds;
        }
    }

    private String id;
    private String account;
    private String token;
    //0:normal 1: accepted
    private Integer status;
    private String memberId;
    private Date   createTime;
    private Date   updateTime;

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getMemberId() {
        return memberId;
    }

    public void setMemberId(String memberId) {
        this.memberId = memberId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    
    public void setStatus(Integer status) {
        this.status = status;
    }

    
    public String getAccount() {
        return account;
    }

    
    public void setAccount(String account) {
        this.account = account;
    }
}
